package com.hp.springioc03;

import com.hp.springioc01.Computer;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestAnnotaionConfig {

    public static void main(String[] args) {
        //注解配置的上下文
        AnnotationConfigApplicationContext contxt =
                new AnnotationConfigApplicationContext(ComputerConfig.class);
        //获得对象
        Computer bean = contxt.getBean(Computer.class);
        bean.start();
    }
}
